package com.bxj.wxtt.service.impl;

import com.bxj.wxtt.api.domain.AdvSite;
import com.bxj.wxtt.mapper.master.AdvSiteMasterMapper;
import com.bxj.wxtt.mapper.slave.AdvSiteSlaveMapper;
import com.bxj.wxtt.service.AdvSiteService;
import com.ifeng.matrix.common.domain.PageResult;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 由MyBatis Generator工具自动生成 2018-07-18 19:49:05
 */
@Component("advSiteService")
public class AdvSiteServiceImpl implements AdvSiteService {
    @Resource
    AdvSiteMasterMapper advSiteMasterMapper;

    @Resource
    AdvSiteSlaveMapper advSiteSlaveMapper;

    public List<AdvSite> getAdvSiteList(AdvSite advSite) {
        return advSiteSlaveMapper.getAdvSiteList(advSite);
    }

    public AdvSite selectById(Integer id) {
        return advSiteSlaveMapper.selectById(id);
    }

    public PageResult<AdvSite> getAdvSitePage(AdvSite advSite) {
        PageResult pageResult = new PageResult();
        pageResult.setCount(advSiteSlaveMapper.countSeletive(advSite));
        pageResult.setResult(advSiteSlaveMapper.getAdvSiteList(advSite));
        return pageResult;
    }

    public int insert(AdvSite advSite) {
        return advSiteMasterMapper.insert(advSite);
    }

    public int deleteAdvSiteById(Integer id) {
        return advSiteMasterMapper.deleteAdvSiteById(id);
    }

    public int updateAdvSiteById(AdvSite advSite) {
        return advSiteMasterMapper.updateAdvSiteById(advSite);
    }
}